<script>
import util from "../libs/util"

export default {
    data() {
        return {
            
        }
    },
    computed:{
        userInfo() {
            return this.$store.state.user.info;
        }
    },
    methods:{
        
        disabledButton(code){
            return this.checkPermission(code)?false:true;
        },
        showButton(code){
            return this.checkPermission(code)?'inline':'none';
        },
        checkPermission(code) {
            var permission = this.$store.state.user.info.permission || {};
            if(permission == null){ 
                return false;
            }else{
                return permission[code] || permission["100010"];
            }   
        }
    }
}
</script>
<style>
    .showTitle{
        display: none;
    }
</style>

